package mianxiangduixiang.Test6.T4;

import java.util.Random;
import java.util.TreeSet;

/**
 * @Author JetZhang
 * @Date 2021/11/4
 */
public class Test4 {
    public static void main(String[] args) {
        TreeSet<Book> books = new TreeSet<>(new MyComparatorForName());
        for (int i = 0; i < 5; i++) {
            books.add(new Book(new Random().nextInt(10) + "test", new Random().nextInt(10) + "test", new Random().nextInt(10)  + "test"));
        }

        for (Book book:books){
            System.out.println(book);
        }
    }
}
